package com.ruoyi.business.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.BusinessStudentMapper;
import com.ruoyi.business.domain.BusinessStudent;
import com.ruoyi.business.service.IBusinessStudentService;
import com.ruoyi.common.core.text.Convert;

/**
 * 教师信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-11-28
 */
@Service
public class BusinessStudentServiceImpl implements IBusinessStudentService 
{
    @Autowired
    private BusinessStudentMapper businessStudentMapper;

    /**
     * 查询教师信息
     * 
     * @param studentId 教师信息主键
     * @return 教师信息
     */
    @Override
    public BusinessStudent selectBusinessStudentByStudentId(Long studentId)
    {
        return businessStudentMapper.selectBusinessStudentByStudentId(studentId);
    }

    /**
     * 查询教师信息列表
     * 
     * @param businessStudent 教师信息
     * @return 教师信息
     */
    @Override
    public List<BusinessStudent> selectBusinessStudentList(BusinessStudent businessStudent)
    {
        return businessStudentMapper.selectBusinessStudentList(businessStudent);
    }

    /**
     * 新增教师信息
     * 
     * @param businessStudent 教师信息
     * @return 结果
     */
    @Override
    public int insertBusinessStudent(BusinessStudent businessStudent)
    {
        return businessStudentMapper.insertBusinessStudent(businessStudent);
    }

    /**
     * 修改教师信息
     * 
     * @param businessStudent 教师信息
     * @return 结果
     */
    @Override
    public int updateBusinessStudent(BusinessStudent businessStudent)
    {
        return businessStudentMapper.updateBusinessStudent(businessStudent);
    }

    /**
     * 批量删除教师信息
     * 
     * @param studentIds 需要删除的教师信息主键
     * @return 结果
     */
    @Override
    public int deleteBusinessStudentByStudentIds(String studentIds)
    {
        return businessStudentMapper.deleteBusinessStudentByStudentIds(Convert.toStrArray(studentIds));
    }

    /**
     * 删除教师信息信息
     * 
     * @param studentId 教师信息主键
     * @return 结果
     */
    @Override
    public int deleteBusinessStudentByStudentId(Long studentId)
    {
        return businessStudentMapper.deleteBusinessStudentByStudentId(studentId);
    }

    @Override
    public BusinessStudent selectBusinessStudentByUserAndPwd(String userName, String password) {
        return businessStudentMapper.selectBusinessStudentByUserAndPwd(userName, password);
    }
}
